/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.basic.third.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.basic.common.constant.enums.ParkBasicModDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 第三方单位服务记录
 *
 * @author pig
 * @date 2023-11-16 11:07:45
 */
@Data
@TableName("base_third_server_record")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "第三方单位服务记录")
public class BaseThirdServerRecordEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;

	/**
	* 第三方单位Id
	*/
    @Schema(description="第三方单位Id")
    private Long employerId;

	/**
	* 服务人员
	*/
    @Schema(description="服务人员")
    private String serverEmployee;

	/**
	* 服务人员联系电话
	*/
    @Schema(description="服务人员联系电话")
    private String serverEmployeePhone;

	/**
	* 服务内容
	*/
    @Schema(description="服务内容")
    private String serverContent;

	/**
	* 服务结果
	*/
    @Schema(description="服务结果")
    private String serverResult;

	/**
	* 服务时间
	*/
    @Schema(description="服务时间")
    private Date serverDate;

	/**
	* 备注说明
	*/
    @Schema(description="备注说明")
    private String remark;

	/**
	* 附件
	*/
    @Schema(description="附件")
    private String attachment;

	public String getOrgIdStr() {
		return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company, this.orgId);
	}

	public String getServerEmployeeStr() {
		return DictResolver.getItemLabelByValue(ParkBasicModDictEnum.third_employee, this.serverEmployee);
	}


	public String getEmployerIdStr() {
		return DictResolver.getItemLabelByValue(ParkBasicModDictEnum.third_unit, this.employerId);
	}

}
